package com.company;

import java.io.IOException;

public class Test06 {
   public static void main(String[] args) {

       System.out.println("请输入字符，按回车键结束输入：");
       int c;
       try {
           c = System.in.read();
           while (c!='\r') {
               System.out.print((char)c);
               c = System.in.read();
           }
       }catch (IOException e) {
           System.out.println(e.toString());
       }finally {
           System.err.println();
       }
   }
}
